-
-
Notifications
You must be signed in to change notification settings - Fork 981
Add auto teardown of event listeners in child page #1544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds automatic teardown of event listeners in the child page and standardizes console styling for observer attach/detach logs.
- Introduces a child-scoped listeners helper that tracks teardown callbacks.
- Switches child code to use the new listener helpers and tweaks READY_STATE_CHANGE handling.
- Updates observer logs to use styled console output with HIGHLIGHT/FOREGROUND.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/child/listeners.js | New listener helpers that auto-register teardown callbacks and log add/remove operations |
| packages/child/index.js | Uses new listener helpers, updates READY_STATE_CHANGE logic, adds setup console event, adjusts setup order and removes some inline logging |
| packages/child/observers/visibility.js | Adds styled logging via HIGHLIGHT/FOREGROUND |
| packages/child/observers/resize.js | Adds styled logging via HIGHLIGHT/FOREGROUND |
| packages/child/observers/perf.js | Adds styled logging via HIGHLIGHT/FOREGROUND |
| packages/child/observers/overflow.js | Adds styled logging for detach via HIGHLIGHT |
| packages/child/observers/mutation.js | Switches to styled logging, but missing required imports for style tokens |
| packages/child/observers/utils.js | Adjusts log message to add styling, but missing required imports for style tokens |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
721db60 to
2363612
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.